From: Keir Fraser Date: Tue, 14 Jul 2009 13:38:56 +0000 (+0100) Subject: pass-through: use vdevn in xm_pci_attach() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13605 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=55eb5c4259dbd41d656e712ff3d5cb227aedd7f0;p=xen.git pass-through: use vdevn in xm_pci_attach() Use vdevfn in xm_pci_attach() for non-zero functions, the vslot element of dev dictionaries no longer exists. Signed-off-by: Simon Horman --- diff --git a/tools/python/xen/xm/main.py b/tools/python/xen/xm/main.py index 8d158b6703..30b1ceff45 100644 --- a/tools/python/xen/xm/main.py +++ b/tools/python/xen/xm/main.py @@ -2555,13 +2555,13 @@ def xm_pci_attach(args): # If the slot wasn't spefified in the args then use the slot # assigned to the head by qemu-xen for the rest of the functions - if int(head_dev['vslot'], 16) & AUTO_PHP_SLOT: + if int(head_dev['vdevfn'], 16) & AUTO_PHP_SLOT: vdevfn = int(find_attached_devfn(attached_pci_dict(dom), head_dev), 16) if not vdevfn & AUTO_PHP_SLOT: vslot = PCI_SLOT(vdevfn) for i in dev: - i['vslot'] = '0x%02x' % \ - PCI_DEVFN(vslot, PCI_FUNC(int(i['vslot'], 16))) + i['vdevfn'] = '0x%02x' % \ + PCI_DEVFN(vslot, PCI_FUNC(int(i['vdevfn'], 16))) for i in dev: xm_pci_attach_one(dom, i)